package com.zb.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zb.entity.ZjFactorySpare;

import java.util.List;

/**
 * <p>
 * 厂商配件关联表 服务类
 * </p>
 *
 * @author WEN
 * @since 2024-04-13
 */
public interface ZjFactorySpareService extends IService<ZjFactorySpare> {

    /**
     * 保存品牌商家与配件的关联
     * @param custAccId 商家平台ID
     * @param spareId 配件ID
     * @param factoryIds 品牌商家ID
     */
    void save(Long custAccId, Long spareId, List<Long> factoryIds);

    /**
     * 根据配件ID删除关联的品牌商家
     * @param spareId 配件ID
     */
    void deleteBySpareId(Long spareId);

    /**
     * 根据配件ID删除关联的品牌商家
     * @param spareIds 配件ID
     */
    void deleteBySpareIds(List<Long> spareIds);

    /**
     * 根据配件ID获取关联的品牌厂商
     * @param spareId 配件ID
     * @return
     */
    List<ZjFactorySpare> getBySpareId(Long spareId);
}
